import { Controller, Get, Param, Req } from '@nestjs/common';
import { MoviesService } from './movies.service';
import { Movie } from './schemas/movies.schemas';

@Controller('movies')
export class MoviesController {
    constructor(private readonly moviesSerivce: MoviesService) { }
    @Get(':page')
    async findAll(@Param() params):Promise<Movie[]> {
        return this.moviesSerivce.findByPage(params.page)
    }
}
